import {ServicePrefixEnum} from "@/enums/commonEnum";
import {RequestEnum} from "@/enums/httpEnum";
import {defHttp} from "@/utils/http/axios";
import type { AxiosRequestConfig } from 'axios';
import request from '@/config/axios'


export interface LoginLogVO {
  id: number
  logType: number
  traceId: number
  userId: number
  userType: number
  username: string
  result: number
  status: number
  userIp: string
  userAgent: string
  createTime: Date
}
const  MODULAR = '/system/login-log'
export const Api = {

  GetDictTypePage: {
    url: `${ServicePrefixEnum.BASE}/${MODULAR}/page`,
    method: RequestEnum.GET,
  } as AxiosRequestConfig,


}
// 查询登录日志列表
export const getLoginLogPage = (params: PageParam) => {
  return defHttp.request({ ...Api.GetDictTypePage,params })
}

// 导出登录日志
//TODO
export const exportLoginLog = (params) => {
  return request.download({ url: '/system/login-log/export', params })
}